<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>glPixelStorei - OpenGL ES 3 Reference Pages</title>
    <link rel="stylesheet" type="text/css" href="opengl-man.css"/>
    <meta name="generator" content="DocBook XSL Stylesheets V1.78.1"/>
    <script type="text/x-mathjax-config">
            MathJax.Hub.Config({
                MathML: {
                    extensions: ["content-mathml.js"]
                },
                tex2jax: {
                    inlineMath: [['$','$'], ['\\(','\\)']]
                }
            });
        </script>
    <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"/>
  </head>
  <body>
    <header/>
    <div class="refentry" id="glPixelStorei">
      <div class="titlepage"/>
      <div class="refnamediv">
        <h2>Name</h2>
        <p>glPixelStorei — set pixel storage modes</p>
      </div>
      <div class="refsynopsisdiv">
        <h2>C Specification</h2>
        <div class="funcsynopsis">
          <table style="border: 0; cellspacing: 0; cellpadding: 0;" class="funcprototype-table">
            <tr>
              <td>
                <code class="funcdef">void <strong class="fsfunc">glPixelStorei</strong>(</code>
              </td>
              <td>GLenum <var class="pdparam">pname</var>, </td>
            </tr>
            <tr>
              <td> </td>
              <td>GLint <var class="pdparam">param</var><code>)</code>;</td>
            </tr>
          </table>
          <div class="funcprototype-spacer"> </div>
        </div>
      </div>
      <div class="refsect1" id="parameters">
        <h2>Parameters</h2>
        <div class="variablelist">
          <dl class="variablelist">
            <dt>
              <span class="term">
                <em class="parameter">
                  <code>pname</code>
                </em>
              </span>
            </dt>
            <dd>
              <p>
                    Specifies the symbolic name of the parameter to be set.
                    Four values affect the packing of pixel data into memory:
                    <code class="constant">GL_PACK_ROW_LENGTH</code>,
                    <code class="constant">GL_PACK_SKIP_PIXELS</code>,
                    <code class="constant">GL_PACK_SKIP_ROWS</code>, and
                    <code class="constant">GL_PACK_ALIGNMENT</code>.
                    Six more affect the unpacking of pixel data <span class="emphasis"><em>from</em></span> memory:
                    <code class="constant">GL_UNPACK_ROW_LENGTH</code>,
                    <code class="constant">GL_UNPACK_IMAGE_HEIGHT</code>,
                    <code class="constant">GL_UNPACK_SKIP_PIXELS</code>,
                    <code class="constant">GL_UNPACK_SKIP_ROWS</code>,
                    <code class="constant">GL_UNPACK_SKIP_IMAGES</code>, and
                    <code class="constant">GL_UNPACK_ALIGNMENT</code>.
                </p>
            </dd>
            <dt>
              <span class="term">
                <em class="parameter">
                  <code>param</code>
                </em>
              </span>
            </dt>
            <dd>
              <p>
                    Specifies the value that <em class="parameter"><code>pname</code></em> is set to.
                </p>
            </dd>
          </dl>
        </div>
      </div>
      <div class="refsect1" id="description">
        <h2>Description</h2>
        <p>
            <code class="function">glPixelStorei</code> sets pixel storage modes that affect the operation of subsequent
            <a class="citerefentry" href="glReadPixels.xhtml"><span class="citerefentry"><span class="refentrytitle">glReadPixels</span></span></a> as well as the unpacking of
            texture patterns (see <a class="citerefentry" href="glTexImage2D.xhtml"><span class="citerefentry"><span class="refentrytitle">glTexImage2D</span></span></a>,
                        <a class="citerefentry" href="glTexImage3D.xhtml"><span class="citerefentry"><span class="refentrytitle">glTexImage3D</span></span></a>,
            <a class="citerefentry" href="glTexSubImage2D.xhtml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage2D</span></span></a>,
                        <a class="citerefentry" href="glTexSubImage3D.xhtml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage3D</span></span></a>).
        </p>
        <p>
            <em class="parameter"><code>pname</code></em> is a symbolic constant indicating the parameter to be set, and
            <em class="parameter"><code>param</code></em> is the new value.  Four of the ten storage parameters affect
            how pixel data is returned to client memory.
            They are as follows:
        </p>
        <div class="variablelist">
          <dl class="variablelist">
            <dt>
              <span class="term">
                <code class="constant">GL_PACK_ROW_LENGTH</code>
              </span>
            </dt>
            <dd>
              <p>
                        If greater than 0,
                        <code class="constant">GL_PACK_ROW_LENGTH</code> defines the number of pixels in a row.
                        If the first pixel of a row is placed at location
                        <math overflow="scroll"><mi mathvariant="italic">p</mi></math>
                        in memory,
                        then the location of the first pixel of the next row is obtained by skipping
                    </p>
              <p>
                        </p>
              <div class="informalequation">
                <math overflow="scroll">
                            
                            <mrow>
                                <mi mathvariant="italic">k</mi>
                                <mo>=</mo>
                                <mfenced open="{" close="">
                                    <mrow>
                                        <mtable>
                                            <mtr><mtd>
                                                <mrow>
                                                    <mi mathvariant="italic">n</mi>
                                                    <mo>⁢</mo>
                                                    <mi mathvariant="italic">l</mi>
                                                </mrow>
                                            </mtd></mtr>
                                            <mtr><mtd>
                                                <mrow>
                                                    <mfenced open="" close="">
                                                        <mfrac>
                                                            <mi mathvariant="italic">a</mi>
                                                            <mi mathvariant="italic">s</mi>
                                                        </mfrac>
                                                    </mfenced>
                                                    <mo>⁢</mo>
                                                    <mfenced open="⌈" close="⌉">
                                                        <mfrac>
                                                            <mfenced open="" close="">
                                                                <mrow>
                                                                    <mi mathvariant="italic">s</mi>
                                                                    <mo>⁢</mo>
                                                                    <mi mathvariant="italic">n</mi>
                                                                    <mo>⁢</mo>
                                                                    <mi mathvariant="italic">l</mi>
                                                                </mrow>
                                                            </mfenced>
                                                            <mi mathvariant="italic">a</mi>
                                                        </mfrac>
                                                    </mfenced>
                                                </mrow>
                                            </mtd></mtr>
                                        </mtable>
                                        <mo>⁢</mo>
                                        <mtable>
                                            <mtr><mtd>
                                                <mrow>
                                                    <mi mathvariant="italic">s</mi>
                                                    <mo>&gt;=</mo>
                                                    <mi mathvariant="italic">a</mi>
                                                </mrow>
                                            </mtd></mtr>
                                            <mtr><mtd>
                                                <mrow>
                                                    <mi mathvariant="italic">s</mi>
                                                    <mo>&lt;</mo>
                                                    <mi mathvariant="italic">a</mi>
                                                </mrow>
                                            </mtd></mtr>
                                        </mtable>
                                    </mrow>
                                </mfenced>
                            </mrow>
                        </math>
              </div>
              <p>
                    </p>
              <p>
                        components or indices,
                        where
                        <math overflow="scroll"><mi mathvariant="italic">n</mi></math>
                        is the number of components or indices in a pixel,
                        <math overflow="scroll"><mi mathvariant="italic">l</mi></math>
                        is the number of pixels in a row
                        (<code class="constant">GL_PACK_ROW_LENGTH</code> if it is greater than 0,
                        the
                        <math overflow="scroll"><mi mathvariant="italic">width</mi></math>
                        argument to the pixel routine otherwise),
                        <math overflow="scroll"><mi mathvariant="italic">a</mi></math>
                        is the value of <code class="constant">GL_PACK_ALIGNMENT</code>, and
                        <math overflow="scroll"><mi mathvariant="italic">s</mi></math>
                        is the size, in bytes, of a single component
                        (if
                        <math overflow="scroll">
                            
                            <mrow>
                                <mi mathvariant="italic">a</mi>
                                <mo>&lt;</mo>
                                <mi mathvariant="italic">s</mi>
                            </mrow>
                        </math>,
                        then it is as if
                        <math overflow="scroll">
                            
                            <mrow>
                                <mi mathvariant="italic">a</mi>
                                <mo>=</mo>
                                <mi mathvariant="italic">s</mi>
                            </mrow>
                        </math>).
                        In the case of 1-bit values,
                        the location of the next row is obtained by skipping
                    </p>
              <p>
                        <math overflow="scroll">
                            
                            <mrow>
                                <mi mathvariant="italic">k</mi>
                                <mo>=</mo>
                                <mrow>
                                    <mn>8</mn>
                                    <mo>⁢</mo>
                                    <mi mathvariant="italic">a</mi>
                                    <mo>⁢</mo>
                                    <mfenced open="⌈" close="⌉">
                                        <mfrac>
                                            <mfenced open="" close="">
                                                <mrow>
                                                    <mi mathvariant="italic">n</mi>
                                                    <mo>⁢</mo>
                                                    <mi mathvariant="italic">l</mi>
                                                </mrow>
                                            </mfenced>
                                            <mfenced open="" close="">
                                                <mrow>
                                                    <mn>8</mn>
                                                    <mo>⁢</mo>
                                                    <mi mathvariant="italic">a</mi>
                                                </mrow>
                                            </mfenced>
                                        </mfrac>
                                    </mfenced>
                                </mrow>
                            </mrow>
                        </math>
                    </p>
              <p>
                        components or indices.
                    </p>
              <p>
                        The word <span class="emphasis"><em>component</em></span> in this description refers to the nonindex values
                        red,
                        green,
                        blue,
                        alpha,
                        and depth.
                        Storage format <code class="constant">GL_RGB</code>,
                        for example,
                        has three components per pixel:
                        first red,
                        then green,
                        and finally blue.
                    </p>
            </dd>
            <dt>
              <span class="term"><code class="constant">GL_PACK_SKIP_PIXELS</code> and <code class="constant">GL_PACK_SKIP_ROWS</code></span>
            </dt>
            <dd>
              <p>
                        These values are provided as a convenience to the programmer;
                        they provide no functionality that cannot be duplicated simply by
                        incrementing the pointer passed to <a class="citerefentry" href="glReadPixels.xhtml"><span class="citerefentry"><span class="refentrytitle">glReadPixels</span></span></a>.
                        Setting <code class="constant">GL_PACK_SKIP_PIXELS</code> to
                        <math overflow="scroll"><mi mathvariant="italic">i</mi></math>
                        is equivalent to incrementing
                        the pointer by
                        <math overflow="scroll">
                            
                            <mrow>
                                <mi mathvariant="italic">i</mi>
                                <mo>⁢</mo>
                                <mi mathvariant="italic">n</mi>
                            </mrow>
                        </math>
                        components or indices,
                        where
                        <math overflow="scroll"><mi mathvariant="italic">n</mi></math>
                        is the number of components or indices in each pixel.
                        Setting <code class="constant">GL_PACK_SKIP_ROWS</code> to
                        <math overflow="scroll"><mi mathvariant="italic">j</mi></math>
                        is equivalent to incrementing
                        the pointer by
                        <math overflow="scroll">
                            
                            <mrow>
                                <mi mathvariant="italic">j</mi>
                                <mo>⁢</mo>
                                <mi mathvariant="italic">m</mi>
                            </mrow>
                        </math>
                        components or indices,
                        where
                        <math overflow="scroll"><mi mathvariant="italic">m</mi></math>
                        is the number of components or indices per row,
                        as just computed in the <code class="constant">GL_PACK_ROW_LENGTH</code> section.
                    </p>
            </dd>
            <dt>
              <span class="term">
                <code class="constant">GL_PACK_ALIGNMENT</code>
              </span>
            </dt>
            <dd>
              <p>
                        Specifies the alignment requirements for the start of each pixel row in memory.
                        The allowable values are
                        1 (byte-alignment),
                        2 (rows aligned to even-numbered bytes),
                        4 (word-alignment), and
                        8 (rows start on double-word boundaries).
                    </p>
            </dd>
          </dl>
        </div>
        <p>
            The other six of the ten storage parameters affect how pixel data is
            read from client memory.
            These values are significant for
            <a class="citerefentry" href="glTexImage2D.xhtml"><span class="citerefentry"><span class="refentrytitle">glTexImage2D</span></span></a>,
            <a class="citerefentry" href="glTexImage3D.xhtml"><span class="citerefentry"><span class="refentrytitle">glTexImage3D</span></span></a>,
            <a class="citerefentry" href="glTexSubImage2D.xhtml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage2D</span></span></a>, and
            <a class="citerefentry" href="glTexSubImage3D.xhtml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage3D</span></span></a>
        </p>
        <p>
            They are as follows:
        </p>
        <div class="variablelist">
          <dl class="variablelist">
            <dt>
              <span class="term">
                <code class="constant">GL_UNPACK_ROW_LENGTH</code>
              </span>
            </dt>
            <dd>
              <p>
                        If greater than 0,
                        <code class="constant">GL_UNPACK_ROW_LENGTH</code> defines the number of pixels in a row.
                        If the first pixel of a row is placed at location
                        <math overflow="scroll"><mi mathvariant="italic">p</mi></math>
                        in memory,
                        then the location of the first pixel of the next row is obtained by skipping
                    </p>
              <p>
                        </p>
              <div class="informalequation">
                <math overflow="scroll">
                            
                            <mrow>
                                <mi mathvariant="italic">k</mi>
                                <mo>=</mo>
                                <mfenced open="{" close="">
                                    <mrow>
                                        <mtable>
                                            <mtr><mtd>
                                                <mrow>
                                                    <mi mathvariant="italic">n</mi>
                                                    <mo>⁢</mo>
                                                    <mi mathvariant="italic">l</mi>
                                                </mrow>
                                            </mtd></mtr>
                                            <mtr><mtd>
                                                <mrow>
                                                    <mfenced open="" close="">
                                                        <mfrac>
                                                            <mi mathvariant="italic">a</mi>
                                                            <mi mathvariant="italic">s</mi>
                                                        </mfrac>
                                                    </mfenced>
                                                    <mo>⁢</mo>
                                                    <mfenced open="⌈" close="⌉">
                                                        <mfrac>
                                                            <mfenced open="" close="">
                                                                <mrow>
                                                                    <mi mathvariant="italic">s</mi>
                                                                    <mo>⁢</mo>
                                                                    <mi mathvariant="italic">n</mi>
                                                                    <mo>⁢</mo>
                                                                    <mi mathvariant="italic">l</mi>
                                                                </mrow>
                                                            </mfenced>
                                                            <mi mathvariant="italic">a</mi>
                                                        </mfrac>
                                                    </mfenced>
                                                </mrow>
                                            </mtd></mtr>
                                        </mtable>
                                        <mo>⁢</mo>
                                        <mtable>
                                            <mtr><mtd>
                                                <mrow>
                                                    <mi mathvariant="italic">s</mi>
                                                    <mo>&gt;=</mo>
                                                    <mi mathvariant="italic">a</mi>
                                                </mrow>
                                            </mtd></mtr>
                                            <mtr><mtd>
                                                <mrow>
                                                    <mi mathvariant="italic">s</mi>
                                                    <mo>&lt;</mo>
                                                    <mi mathvariant="italic">a</mi>
                                                </mrow>
                                            </mtd></mtr>
                                        </mtable>
                                    </mrow>
                                </mfenced>
                            </mrow>
                        </math>
              </div>
              <p>
                    </p>
              <p>
                        components or indices,
                        where
                        <math overflow="scroll"><mi mathvariant="italic">n</mi></math>
                        is the number of components or indices in a pixel,
                        <math overflow="scroll"><mi mathvariant="italic">l</mi></math>
                        is the number of pixels in a row
                        (<code class="constant">GL_UNPACK_ROW_LENGTH</code> if it is greater than 0,
                        the
                        <math overflow="scroll"><mi mathvariant="italic">width</mi></math>
                        argument to the pixel routine otherwise),
                        <math overflow="scroll"><mi mathvariant="italic">a</mi></math>
                        is the value of <code class="constant">GL_UNPACK_ALIGNMENT</code>, and
                        <math overflow="scroll"><mi mathvariant="italic">s</mi></math>
                        is the size, in bytes, of a single component
                        (if
                        <math overflow="scroll">
                            
                            <mrow>
                                <mi mathvariant="italic">a</mi>
                                <mo>&lt;</mo>
                                <mi mathvariant="italic">s</mi>
                            </mrow>
                        </math>,
                        then it is as if
                        <math overflow="scroll">
                            
                            <mrow>
                                <mi mathvariant="italic">a</mi>
                                <mo>=</mo>
                                <mi mathvariant="italic">s</mi>
                            </mrow>
                        </math>).
                        In the case of 1-bit values,
                        the location of the next row is obtained by skipping
                    </p>
              <p>
                        <math overflow="scroll">
                            
                            <mrow>
                                <mi mathvariant="italic">k</mi>
                                <mo>=</mo>
                                <mrow>
                                    <mn>8</mn>
                                    <mo>⁢</mo>
                                    <mi mathvariant="italic">a</mi>
                                    <mo>⁢</mo>
                                    <mfenced open="⌈" close="⌉">
                                        <mfrac>
                                            <mfenced open="" close="">
                                                <mrow>
                                                    <mi mathvariant="italic">n</mi>
                                                    <mo>⁢</mo>
                                                    <mi mathvariant="italic">l</mi>
                                                </mrow>
                                            </mfenced>
                                            <mfenced open="" close="">
                                                <mrow>
                                                    <mn>8</mn>
                                                    <mo>⁢</mo>
                                                    <mi mathvariant="italic">a</mi>
                                                </mrow>
                                            </mfenced>
                                        </mfrac>
                                    </mfenced>
                                </mrow>
                            </mrow>
                        </math>
                    </p>
              <p>
                        components or indices.
                    </p>
              <p>
                        The word <span class="emphasis"><em>component</em></span> in this description refers to the nonindex values
                        red,
                        green,
                        blue,
                        alpha,
                        and depth.
                        Storage format <code class="constant">GL_RGB</code>,
                        for example,
                        has three components per pixel:
                        first red,
                        then green,
                        and finally blue.
                    </p>
            </dd>
            <dt>
              <span class="term">
                <code class="constant">GL_UNPACK_IMAGE_HEIGHT</code>
              </span>
            </dt>
            <dd>
              <p>
                        If greater than 0,
                        <code class="constant">GL_UNPACK_IMAGE_HEIGHT</code> defines the number of pixels in an image of
                        a three-dimensional texture volume.  Where ``image'' is defined by all
                        pixel sharing the same third dimension index.
                        If the first pixel of a row is placed at location
                        <math overflow="scroll"><mi mathvariant="italic">p</mi></math>
                        in memory,
                        then the location of the first pixel of the next row is obtained by skipping
                    </p>
              <p>
                        </p>
              <div class="informalequation">
                <math overflow="scroll">
                            
                            <mrow>
                                <mi mathvariant="italic">k</mi>
                                <mo>=</mo>
                                <mfenced open="{" close="">
                                    <mrow>
                                        <mtable>
                                            <mtr><mtd>
                                                <mrow>
                                                    <mi mathvariant="italic">n</mi>
                                                    <mo>⁢</mo>
                                                    <mi mathvariant="italic">l</mi>
                                                    <mo>⁢</mo>
                                                    <mi mathvariant="italic">h</mi>
                                                </mrow>
                                            </mtd></mtr>
                                            <mtr><mtd>
                                                <mrow>
                                                    <mfenced open="" close="">
                                                        <mfrac>
                                                            <mi mathvariant="italic">a</mi>
                                                            <mi mathvariant="italic">s</mi>
                                                        </mfrac>
                                                    </mfenced>
                                                    <mo>⁢</mo>
                                                    <mfenced open="⌈" close="⌉">
                                                        <mfrac>
                                                            <mfenced open="" close="">
                                                                <mrow>
                                                                    <mi mathvariant="italic">s</mi>
                                                                    <mo>⁢</mo>
                                                                    <mi mathvariant="italic">n</mi>
                                                                    <mo>⁢</mo>
                                                                    <mi mathvariant="italic">l</mi>
                                                                    <mo>⁢</mo>
                                                                    <mi mathvariant="italic">h</mi>
                                                                </mrow>
                                                            </mfenced>
                                                            <mi mathvariant="italic">a</mi>
                                                        </mfrac>
                                                    </mfenced>
                                                </mrow>
                                            </mtd></mtr>
                                        </mtable>
                                        <mo>⁢</mo>
                                        <mtable>
                                            <mtr><mtd>
                                                <mrow>
                                                    <mi mathvariant="italic">s</mi>
                                                    <mo>&gt;=</mo>
                                                    <mi mathvariant="italic">a</mi>
                                                </mrow>
                                            </mtd></mtr>
                                            <mtr><mtd>
                                                <mrow>
                                                    <mi mathvariant="italic">s</mi>
                                                    <mo>&lt;</mo>
                                                    <mi mathvariant="italic">a</mi>
                                                </mrow>
                                            </mtd></mtr>
                                        </mtable>
                                    </mrow>
                                </mfenced>
                            </mrow>
                        </math>
              </div>
              <p>
                    </p>
              <p>
                        components or indices,
                        where
                        <math overflow="scroll"><mi mathvariant="italic">n</mi></math>
                        is the number of components or indices in a pixel,
                        <math overflow="scroll"><mi mathvariant="italic">l</mi></math>
                        is the number of pixels in a row
                        (<code class="constant">GL_UNPACK_ROW_LENGTH</code> if it is greater than 0,
                        the
                        <math overflow="scroll"><mi mathvariant="italic">width</mi></math>
                        argument to <a class="citerefentry" href="glTexImage3D.xhtml"><span class="citerefentry"><span class="refentrytitle">glTexImage3D</span></span></a> otherwise),
                        <math overflow="scroll"><mi mathvariant="italic">h</mi></math>
                        is the number of rows in an image (<code class="constant">GL_UNPACK_IMAGE_HEIGHT</code> if
                        it is greater than 0, the
                        <math overflow="scroll"><mi mathvariant="italic">height</mi></math>
                        argument to <a class="citerefentry" href="glTexImage3D.xhtml"><span class="citerefentry"><span class="refentrytitle">glTexImage3D</span></span></a> otherwise),
                        <math overflow="scroll"><mi mathvariant="italic">a</mi></math>
                        is the value of <code class="constant">GL_UNPACK_ALIGNMENT</code>, and
                        <math overflow="scroll"><mi mathvariant="italic">s</mi></math>
                        is the size, in bytes, of a single component
                        (if
                        <math overflow="scroll">
                            
                            <mrow>
                                <mi mathvariant="italic">a</mi>
                                <mo>&lt;</mo>
                                <mi mathvariant="italic">s</mi>
                            </mrow>
                        </math>,
                        then it is as if
                        <math overflow="scroll">
                            
                            <mrow>
                                <mi mathvariant="italic">a</mi>
                                <mo>=</mo>
                                <mi mathvariant="italic">s</mi>
                            </mrow>
                        </math>).
                    </p>
              <p>
                        The word <span class="emphasis"><em>component</em></span> in this description refers to the nonindex values
                        red,
                        green,
                        blue,
                        alpha,
                        and depth.
                        Storage format <code class="constant">GL_RGB</code>,
                        for example,
                        has three components per pixel:
                        first red,
                        then green,
                        and finally blue.
                    </p>
            </dd>
            <dt>
              <span class="term"><code class="constant">GL_UNPACK_SKIP_PIXELS</code>, <code class="constant">GL_UNPACK_SKIP_ROWS</code> and <code class="constant">GL_UNPACK_SKIP_IMAGES</code></span>
            </dt>
            <dd>
              <p>
                        These values are provided as a convenience to the programmer;
                        they provide no functionality that cannot be duplicated by
                        incrementing the pointer passed to
                        <a class="citerefentry" href="glTexImage1D.xhtml"><span class="citerefentry"><span class="refentrytitle">glTexImage1D</span></span></a>,
                        <a class="citerefentry" href="glTexImage2D.xhtml"><span class="citerefentry"><span class="refentrytitle">glTexImage2D</span></span></a>,
                        <a class="citerefentry" href="glTexSubImage1D.xhtml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage1D</span></span></a> or
                        <a class="citerefentry" href="glTexSubImage2D.xhtml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage2D</span></span></a>.
                        Setting <code class="constant">GL_UNPACK_SKIP_PIXELS</code> to
                        <math overflow="scroll"><mi mathvariant="italic">i</mi></math>
                        is equivalent to incrementing
                        the pointer by
                        <math overflow="scroll">
                            
                            <mrow>
                                <mi mathvariant="italic">i</mi>
                                <mo>⁢</mo>
                                <mi mathvariant="italic">n</mi>
                            </mrow>
                        </math>
                        components or indices,
                        where
                        <math overflow="scroll"><mi mathvariant="italic">n</mi></math>
                        is the number of components or indices in each pixel.
                        Setting <code class="constant">GL_UNPACK_SKIP_ROWS</code> to
                        <math overflow="scroll"><mi mathvariant="italic">j</mi></math>
                        is equivalent to incrementing
                        the pointer by
                        <math overflow="scroll">
                            
                            <mrow>
                                <mi mathvariant="italic">j</mi>
                                <mo>⁢</mo>
                                <mi mathvariant="italic">k</mi>
                            </mrow>
                        </math>
                        components or indices,
                        where
                        <math overflow="scroll"><mi mathvariant="italic">k</mi></math>
                        is the number of components or indices per row,
                        as just computed in the <code class="constant">GL_UNPACK_ROW_LENGTH</code> section.
                                                Setting <code class="constant">GL_UNPACK_SKIP_IMAGES</code> to
                        <math overflow="scroll"><mi mathvariant="italic">k</mi></math>
                        is equivalent to incrementing
                        the pointer by
                        <math overflow="scroll">
                            
                            <mrow>
                                <mi mathvariant="italic">k</mi>
                                <mo>⁢</mo>
                                <mi mathvariant="italic">p</mi>
                            </mrow>
                        </math>,
                        where
                        <math overflow="scroll"><mi mathvariant="italic">p</mi></math>
                        is the number of components or indices
                        per image, as computed in the <code class="constant">GL_UNPACK_IMAGE_HEIGHT</code> section.
                                                </p>
            </dd>
            <dt>
              <span class="term">
                <code class="constant">GL_UNPACK_ALIGNMENT</code>
              </span>
            </dt>
            <dd>
              <p>
                        Specifies the alignment requirements for the start of each pixel row in memory.
                        The allowable values are
                        1 (byte-alignment),
                        2 (rows aligned to even-numbered bytes),
                        4 (word-alignment), and
                        8 (rows start on double-word boundaries).
                    </p>
            </dd>
          </dl>
        </div>
        <p>
            The following table gives the type,
            initial value,
            and range of valid values for each storage parameter
            that can be set with <code class="function">glPixelStorei</code>.
        </p>
        <p>
        </p>
        <div class="informaltable">
          <table style="border-collapse: collapse; border-top: 2px solid ; border-bottom: 2px solid ; border-left: 2px solid ; border-right: 2px solid ; ">
            <colgroup>
              <col style="text-align: left; "/>
              <col style="text-align: center; "/>
              <col style="text-align: center; "/>
              <col style="text-align: center; "/>
            </colgroup>
            <thead>
              <tr>
                <th style="text-align: left; border-right: 2px solid ; border-bottom: 2px solid ; ">
                            <span class="bold"><strong> <em class="parameter"><code>pname</code></em> </strong></span>
                        </th>
                <th style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                            <span class="bold"><strong> Type </strong></span>
                        </th>
                <th style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                            <span class="bold"><strong> Initial Value </strong></span>
                        </th>
                <th style="text-align: center; border-bottom: 2px solid ; ">
                            <span class="bold"><strong> Valid Range </strong></span>
                        </th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td style="text-align: left; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        <code class="constant">GL_PACK_ROW_LENGTH</code>
                        </td>
                <td style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        integer
                        </td>
                <td style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        0
                        </td>
                <td style="text-align: center; border-bottom: 2px solid ; ">
                        <math overflow="scroll">
                            
                            <mfenced open="[" close=")">
                                <mn>0</mn>
                                <infinity definitionURL="" encoding=""/>
                            </mfenced>
                        </math>
                        </td>
              </tr>
              <tr>
                <td style="text-align: left; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        <code class="constant">GL_PACK_SKIP_ROWS</code>
                        </td>
                <td style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        integer
                        </td>
                <td style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        0
                        </td>
                <td style="text-align: center; border-bottom: 2px solid ; ">
                        <math overflow="scroll">
                            
                            <mfenced open="[" close=")">
                                <mn>0</mn>
                                <infinity definitionURL="" encoding=""/>
                            </mfenced>
                        </math>
                        </td>
              </tr>
              <tr>
                <td style="text-align: left; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        <code class="constant">GL_PACK_SKIP_PIXELS</code>
                        </td>
                <td style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        integer
                        </td>
                <td style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        0
                        </td>
                <td style="text-align: center; border-bottom: 2px solid ; ">
                        <math overflow="scroll">
                            
                            <mfenced open="[" close=")">
                                <mn>0</mn>
                                <infinity definitionURL="" encoding=""/>
                            </mfenced>
                        </math>
                        </td>
              </tr>
              <tr>
                <td style="text-align: left; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        <code class="constant">GL_PACK_ALIGNMENT</code>
                        </td>
                <td style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        integer
                        </td>
                <td style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        4
                        </td>
                <td style="text-align: center; border-bottom: 2px solid ; ">
                        1, 2, 4, or 8
                        </td>
              </tr>
              <tr>
                <td style="text-align: left; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        <code class="constant">GL_UNPACK_ROW_LENGTH</code>
                        </td>
                <td style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        integer
                        </td>
                <td style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        0
                        </td>
                <td style="text-align: center; border-bottom: 2px solid ; ">
                        <math overflow="scroll">
                            
                            <mfenced open="[" close=")">
                                <mn>0</mn>
                                <infinity definitionURL="" encoding=""/>
                            </mfenced>
                        </math>
                        </td>
              </tr>
              <tr>
                <td style="text-align: left; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        <code class="constant">GL_UNPACK_IMAGE_HEIGHT</code>
                        </td>
                <td style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        integer
                        </td>
                <td style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        0
                        </td>
                <td style="text-align: center; border-bottom: 2px solid ; ">
                        <math overflow="scroll">
                            
                            <mfenced open="[" close=")">
                                <mn>0</mn>
                                <infinity definitionURL="" encoding=""/>
                            </mfenced>
                        </math>
                        </td>
              </tr>
              <tr>
                <td style="text-align: left; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        <code class="constant">GL_UNPACK_SKIP_ROWS</code>
                        </td>
                <td style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        integer
                        </td>
                <td style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        0
                        </td>
                <td style="text-align: center; border-bottom: 2px solid ; ">
                        <math overflow="scroll">
                            
                            <mfenced open="[" close=")">
                                <mn>0</mn>
                                <infinity definitionURL="" encoding=""/>
                            </mfenced>
                        </math>
                        </td>
              </tr>
              <tr>
                <td style="text-align: left; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        <code class="constant">GL_UNPACK_SKIP_PIXELS</code>
                        </td>
                <td style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        integer
                        </td>
                <td style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        0
                        </td>
                <td style="text-align: center; border-bottom: 2px solid ; ">
                        <math overflow="scroll">
                            
                            <mfenced open="[" close=")">
                                <mn>0</mn>
                                <infinity definitionURL="" encoding=""/>
                            </mfenced>
                        </math>
                        </td>
              </tr>
              <tr>
                <td style="text-align: left; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        <code class="constant">GL_UNPACK_SKIP_IMAGES</code>
                        </td>
                <td style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        integer
                        </td>
                <td style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                        0
                        </td>
                <td style="text-align: center; border-bottom: 2px solid ; ">
                        <math overflow="scroll">
                            
                            <mfenced open="[" close=")">
                                <mn>0</mn>
                                <infinity definitionURL="" encoding=""/>
                            </mfenced>
                        </math>
                        </td>
              </tr>
              <tr>
                <td style="text-align: left; border-right: 2px solid ; ">
                        <code class="constant">GL_UNPACK_ALIGNMENT</code>
                        </td>
                <td style="text-align: center; border-right: 2px solid ; ">
                        integer
                        </td>
                <td style="text-align: center; border-right: 2px solid ; ">
                        4
                        </td>
                <td style="text-align: center; ">
                        1, 2, 4, or 8
                        </td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <div class="refsect1" id="errors">
        <h2>Errors</h2>
        <p>
            <code class="constant">GL_INVALID_ENUM</code> is generated if <em class="parameter"><code>pname</code></em> is not an accepted value.
        </p>
        <p>
            <code class="constant">GL_INVALID_VALUE</code> is generated if a negative row length,
            pixel skip,
            or row skip value is specified,
            or if alignment is specified as other than 1, 2, 4, or 8.
        </p>
      </div>
      <div class="refsect1" id="associatedgets">
        <h2>Associated Gets</h2>
        <p>
            <a class="citerefentry" href="glGet.xhtml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_PACK_ROW_LENGTH</code>
        </p>
        <p>
            <a class="citerefentry" href="glGet.xhtml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_PACK_SKIP_ROWS</code>
        </p>
        <p>
            <a class="citerefentry" href="glGet.xhtml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_PACK_SKIP_PIXELS</code>
        </p>
        <p>
            <a class="citerefentry" href="glGet.xhtml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_PACK_ALIGNMENT</code>
        </p>
        <p>
            <a class="citerefentry" href="glGet.xhtml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_UNPACK_ROW_LENGTH</code>
        </p>
        <p>
            <a class="citerefentry" href="glGet.xhtml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_UNPACK_IMAGE_HEIGHT</code>
        </p>
        <p>
            <a class="citerefentry" href="glGet.xhtml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_UNPACK_SKIP_ROWS</code>
        </p>
        <p>
            <a class="citerefentry" href="glGet.xhtml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_UNPACK_SKIP_PIXELS</code>
        </p>
        <p>
            <a class="citerefentry" href="glGet.xhtml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_UNPACK_SKIP_IMAGES</code>
        </p>
        <p>
            <a class="citerefentry" href="glGet.xhtml"><span class="citerefentry"><span class="refentrytitle">glGet</span></span></a> with argument <code class="constant">GL_UNPACK_ALIGNMENT</code>
        </p>
      </div>
      <div class="refsect1" id="versions">
        <h2>API Version Support</h2>
        <div class="informaltable">
          <table style="border-collapse: collapse; border-top: 2px solid ; border-bottom: 2px solid ; border-left: 2px solid ; border-right: 2px solid ; ">
            <colgroup>
              <col style="text-align: left; "/>
              <col style="text-align: center; " class="firstvers"/>
              <col style="text-align: center; " class="lastvers"/>
            </colgroup>
            <thead>
              <tr>
                <th style="text-align: left; border-right: 2px solid ; ">
                 
            </th>
                <th style="text-align: center; border-bottom: 2px solid ; " colspan="2">
                <span class="bold"><strong>OpenGL ES API Version</strong></span>
            </th>
              </tr>
              <tr>
                <th style="text-align: left; border-right: 2px solid ; border-bottom: 2px solid ; ">
                <span class="bold"><strong>Function Name</strong></span>
            </th>
                <th style="text-align: center; border-right: 2px solid ; border-bottom: 2px solid ; ">
                <span class="bold"><strong>2.0</strong></span>
            </th>
                <th style="text-align: center; border-bottom: 2px solid ; ">
                <span class="bold"><strong>3.0</strong></span>
            </th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td style="text-align: left; border-right: 2px solid ; ">glPixelStorei</td>
                <td style="text-align: center; border-right: 2px solid ; ">✔</td>
                <td style="text-align: center; ">✔</td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
      <div class="refsect1" id="seealso">
        <h2>See Also</h2>
        <p>
            <a class="citerefentry" href="glReadPixels.xhtml"><span class="citerefentry"><span class="refentrytitle">glReadPixels</span></span></a>,
            <a class="citerefentry" href="glTexImage2D.xhtml"><span class="citerefentry"><span class="refentrytitle">glTexImage2D</span></span></a>,
            <a class="citerefentry" href="glTexImage3D.xhtml"><span class="citerefentry"><span class="refentrytitle">glTexImage3D</span></span></a>,
            <a class="citerefentry" href="glTexSubImage2D.xhtml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage2D</span></span></a>,
            <a class="citerefentry" href="glTexSubImage3D.xhtml"><span class="citerefentry"><span class="refentrytitle">glTexSubImage3D</span></span></a>
        </p>
      </div>
      <div class="refsect1" id="Copyright">
        <h2>Copyright</h2>
        <p>
            Copyright <span class="trademark"/>© 1991-2006 Silicon Graphics, Inc.
            Copyright <span class="trademark"/>© 2010-2016 Khronos Group.
            This document is licensed under the SGI Free Software B License.
            For details, see
            <a class="link" href="http://oss.sgi.com/projects/FreeB/" target="_top">http://oss.sgi.com/projects/FreeB/</a>.
        </p>
      </div>
    </div>
    <footer/>
  </body>
</html>
